<template>
	<view class="content">
	    <time-line ref="timeline" location="left"></time-line>
		<u-button type="primary" color='#FF9800' @click="pageJump('../search/search')" shape="circle" text="+ 添加行程"></u-button>
	</view>
</template>

<script>
	import timeLine from '../timeLine/timeLine.vue'
	    export default {
	        components:{
	            timeLine
	        },
	        data() {
	            return {
	                time:0,
	                isclick:true,
	            };
	        },
	        onLoad() {
	            
	        },
	        onPageScroll() {
	            if(this.isclick){
	                this.timer();
	                this.$refs.timeline.getScroll();
	            }
	        },
	        onReady() {
	            
	        },
	        methods: {
	            timer(){
	                if(this.time>0){
	                    this.isclick=false;
	                    this.time--;
	                    setTimeout(this.timer,1)
	                }
	                else{
	                    this.isclick=true;
	                    this.time=10
	                }
	            },
				pageJump(value){
					uni.navigateTo({
					  // url:'../position/position'
					  url:value
					})
				},
	            
	        }
	    };
</script>

<style lang="scss" scoped>
.content{
	
	padding-bottom: 100px;
	/deep/ .u-button {
		max-width: 100px;
		padding: 10px 20px;
		position: fixed;
		bottom: 5%;
		left: 50%;
		transform: translateX(-50%);
	}
}
</style>
